package com.dobbinsoft.iotechn.device.api.open;

import com.dobbinsoft.iotechn.core.annotation.HttpMethod;
import com.dobbinsoft.iotechn.core.annotation.HttpOpenApi;
import com.dobbinsoft.iotechn.core.annotation.HttpParam;
import com.dobbinsoft.iotechn.core.annotation.HttpParamType;
import com.dobbinsoft.iotechn.core.annotation.param.NotNull;
import com.dobbinsoft.iotechn.core.exception.ServiceException;
import com.dobbinsoft.iotechn.device.domain.ProductControllerDO;
import com.dobbinsoft.iotechn.device.dto.ControllerComponentDTO;

import java.util.List;

/**
 * Description:
 * User: rize
 * Date: 2020/6/23
 * Time: 15:52
 */
@HttpOpenApi(group = "controller", description = "为用户(APP)提供遥控器服务")
public interface ControllerService {

    @HttpMethod(description = "列举出设备所有控制器")
    public List<ProductControllerDO> list(
            @NotNull @HttpParam(name = "productId", type = HttpParamType.COMMON, description = "产品ID") Long productId) throws ServiceException;

    @HttpMethod(description = "列举遥控器组件 以用于预览")
    public List<ControllerComponentDTO> listComponent(
            @NotNull @HttpParam(name = "controllerId", type = HttpParamType.COMMON, description = "遥控器Id") Long controllerId) throws ServiceException;

}
